package com.darwin.darwinUI.manager.base
{
	import com.darwin.darwinUI.controls.Label;
	import com.darwin.darwinUI.general.DarwinFont;
	
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFormatAlign;
	
	public class ToolTipBase extends Sprite implements IToolTip
	{
		public function ToolTipBase()
		{
			super();
			this.graphics.beginFill(0xDDDDDD,0.3);
			this.graphics.drawRoundRect(0,0,100,40,10,10);
			this.graphics.endFill();
			
			_text = new Label("",new DarwinFont(null,12,true,false,false,null,TextFormatAlign.CENTER),10);
			_text.width = 100;
			_text.height = 40;
			addChild(_text);
			
		}
		
		private var _text:Label;
		
		public function setData(data:Object, item:*):void
		{
			_text.text = data.toString();
			_text.x = (this.width - _text.width)/2;
			_text.y = (this.height - _text.height)/2;
		}
		
		
		
	}
}